<?php $this->load->view('admin/_header1') ?>
<script language="javascript" type="text/javascript" src="<?=site_url("Phome/get_lang")?>"></script>
<script language=javascript src="<?=site_url('js/policy.js');?>"></script>
<script language=javascript src="<?=site_url('js/validator.js');?>"></script>
<?php
echo form_open("admin/operation/dosavePrivateFredight",array("onsubmit" =>"return Checkairpolicy_1(this)"));
echo form_hidden("groupid",$groupid);
echo form_hidden("ProductType","I");
?>
<div class="dvfbody2" style="border:0px">
	
<div class="dvfbody2" style="border:0px">
<table width=100% border=1 bordercolor="#B6CEFF" >


<tr height=34 >
	
	<td width=117  align="right" class="blackb"  >Flight type:</td>
	<td >
		<input type=radio name=RoundTrip value="S" id=rdTrip1 <?=set_radio("RoundTrip","S",$RoundTrip=="S");?> ><label for=rdTrip1>One way</label>
		<input type=radio name=RoundTrip value="R" id=rdTrip2 <?=set_radio("RoundTrip","R",$RoundTrip=="R");?> ><label for=rdTrip2>Round Trip</label>	
	</td>
	
</tr>


<tr height=140 ><td align="right" class="blackb" >From:</td>
	<td colspan=3 style="padding:5px">
	<span style="color:#0093E0;">Direct input, a number of airports with "/"to separate</span><BR/>
		<table><tr valign=top>
		
			<td>
				<textarea name=FromPorts id="txFromports" style="width:195px;height:98px"   verify="M" desc="From port" onkeyup="splitport(this);"><?=set_value("FromPorts",$sFromPorts)?></textarea>				
			</td>
			<td valign=middle >To</td>
			<td>
				<textarea name=DestPorts id="txDestports" style="width:195px;height:98px"  verify="M" desc="Dest Port" onkeyup="splitport(this);"><?=set_value("DestPorts",$sDestPorts)?></textarea>	
			</td>
			</tr>
		</table>
	</td>
</tr>
	

<tr height=35 ><td align="right" class="blackb" >Effect Date:</td>
<td colspan=3>
	<input type="text" id="txPolicyDate1" style="width:90px;" class=txdate1 name="PolicyDate1" verify="M" desc="政策有效日期"  value="<?=set_value("PolicyDate1",$sPolicyDate1)?>">
				To
	<input type="text" class=txdate1 id="txPolicyDate2" style="width:90px;" name="PolicyDate2" verify="M" desc="政策有效日期"  value="<?=set_value("PolicyDate2",$sPolicyDate2)?>">
	<span style="color:#0093E0;">* Means the effective time period query</span>	
</td></tr>

<tr height=35 ><td align="right" class="blackb" >Ticket effectDate:</td>
<td colspan=3>
	<input type="text" id="txTicketDate1" style="width:90px;" class=txdate1  name="TicketDate1" verify="M" desc="出票有效日期"  value="<?=set_value("TicketDate1",$sTicketDate1)?>">
				To
	<input type="text" id="txTicketDate2" style="width:90px;" class="txdate1" name="TicketDate2" verify="M" desc="出票有效日期" value="<?=set_value("TicketDate2",$sTicketDate2)?>">
	<span style="color:#0093E0;">* Means the effective take-off flight time</span>
	<a href="javascript:;" style="color:red;text-decoration:underline;" onclick="gd$('txTicketDate1').value=gd$('txPolicyDate1').value;gd$('txTicketDate2').value=gd$('txPolicyDate2').value;" >copy</a>
</td>
</tr>
<tr height=35 ><td align="right" class="blackb" >Week:</td>
<td colspan=3><?php
	$arweek=array("Mon","Tue","Wed","Thu","Fri","Sat","Sun");

	for($i=1;$i<8;$i++)
	{
		echo form_checkbox('FlightWeek11[]',$i,strpos($sweek,(string)$i)>-1);
		echo $arweek[$i-1];
	}
?>&nbsp;&nbsp;(Monday to Sunday)
</td></tr>


		
</table></div>


<div class="dvfbody2" id="dvGroupPolicy" style="border:0px">
	
<table width=100% style="margin:5px 0 5px 0" border=1 bordercolor="#B6CEFF" >
	<tr><td width=72 align="right" class="blackb" >Airlines:</td>
		<td><?
		echo $selairline	
		?></td>
	</tr>
	
	<tr><td align="right" class="blackb" >policy:<BR>
		<a href="javascript://" class=orange onclick="addmodelbyIndex1(2,iMaxI++)">add</a></td>
		<td><table border=1 bordercolor="#B6CEFF"   width=400 id="tbGroupPolicy_2" >
		<tr height=28 style="background-color:#F0F0F0;">
			<td width=102 align="center">classcode</td>
			<td width=100 align="center">fare</td>
			<td width=100 align="center">TaxFee</td>
			<td width=100 align="center">Class Note</td>
			<td width=100 align="center">Stop Day</td>
			<td width=50 align="center">Mix</td>
			<td width=53 align="center"></td>
		</tr>
	</table></td>
	</tr>
	
	<tr height=30 valign="top" >
	<td width=72  align="right" class="blackb" >Flightnumber:</td>
	<td align="left">
		<span style="width:500px;height:70px;padding:5px 0 0 8px;">
			<input type="radio" id="txFlightNumLimit1_1" name="FlightNumLimit1" value="0" <?=set_radio("FlightNumLimit1","0",$sFlightNumLimit1=="0")?> /><label for="txFlightNumLimit1_1">All flights</label>
			<input type="radio" id="txFlightNumLimit1_2" name="FlightNumLimit1" value="1" <?=set_radio("FlightNumLimit1","1",$sFlightNumLimit1=="1")?>  /><label for="txFlightNumLimit1_2">apply to flights</label>
			<input type="radio" id="txFlightNumLimit1_3" name="FlightNumLimit1" value="2" <?=set_radio("FlightNumLimit1","2",$sFlightNumLimit1=="2")?>  /><label for="txFlightNumLimit1_3">Does not apply to flights</label><BR>
			<span style="padding-top:3px;"><input type="text" style="width:486px;" id="txFlightNum1" name="FlightNum1" value="<?=set_value("FlightNum1",$sFlightNum1)?>" /></span>
			<span style="word-break:break-all;padding-top:5px;color:#0093E0;">
				* Between the multiple flight numbers with "/ " partition.
			</span>
			</span>	
		</td>
	</tr>
</table>

</div>

<div class="dvfbody2" style="border:0px">
<table width=100% border=1 bordercolor="#B6CEFF" >
	
	<tr height=34 >
		<td width=87 align="right" class="blackb" >booknote:</td>
		<td><textarea style="width:491px;height:49px;" name="Note" ><?=set_value("Note",$sNote)?></textarea>
			<br /><span style="padding-top:3px;word-break:break-all;width:491px;color:#0093E0;">
				* Fill in the fare rules and special requirements such as not to change, not back,<BR/> not to be signed and other information.
			</span>	
		</td>
	</tr>
	
</table>
</div>

<div style="text-align:center;padding-top:10px;height:40px;">
	<input type=submit name=s class=button value="save">
</div>
<?php
echo form_close();
?>


<div id="dvModel" style="display:none;">
	
	<table id="tbModel_2" width=614 align="center">
		<tr height=30 >
			<td width=102 align="center"><input type="text" id="txSinDiscount_REPLACE_INDEX" verify="ML" desc="ClassCode" min2max="1-2" class="txa" style="width:80px" name="ClassCode[]" value="" />
				<input type="hidden" id="txPolicyCode_REPLACE_INDEX"  name="PolicyCode[]" value="0" />
				<input type="hidden" id="txDiscount_REPLACE_INDEX" name="Discount[]" value="0" />
			</td>
			
			<td width=100 align="center"><input type="text" id="txFare_REPLACE_INDEX" verify="N" desc="Fare" class="txa" style="width:80px" name="Fare[]" value="0" /></td>			
			<td width=100 align="center"><input type="text" id="txTaxFee_REPLACE_INDEX" verify="N" desc="TaxFee" class="txa" style="width:80px" name="TaxFee[]" value="0" /></td>
			<td width=100 align="center"><textarea type="text" id="txClassNote_REPLACE_INDEX"  class="txa" style="width:120px;height:45px" name="ClassNote[]" value=""></textarea></td>
			<td width=100 align="center"><input type="text" id="txStopDay_REPLACE_INDEX" verify="N" desc="Stop Day" class="txa" style="width:80px" name="StopDay[]" value="0" /></td>
			<td width=100 align="center"><input type="checkbox" id="chkMix_REPLACE_INDEX" name="MixC" onclick="setMix(this);" value="1" /><input type="hidden" id="txMix_REPLACE_INDEX" name="MixClass[]" value="0" />
			</td>
			<td width=53  align="center">
				<a href=# title="del" style="color:red;" onclick="return delnomalclass(this);" >delete</a>
			</td>
		</tr>
	</table>
</div>
<script language=javascript>
var iMaxI=1;
$(document).ready(function(){
	
	initinputValue();
	$(".txdate1").datepick({monthsToShow:2});
	
	<?php
	foreach($arClass as $item)
	{
	?>
	addmodelbyIndex1(2,iMaxI);
	jsonValue2={
		"ClassCode":"<?=$item->ClassCode?>",
		"Discount":"<?=$item->Discount?>",
		"Fare":"<?=$item->Fare?>",
		"TaxFee":"<?=$item->TaxFee?>",
		"StopDay":"<?=$item->stopday?>",
		"ClassNote":"<?=$item->ClassNote?>",
		"MixClass":"<?=$item->MixClass?>"
	};
		
	setClassPolicyT(iMaxI,jsonValue2);
	iMaxI++;
	<?php
	}
	?>
	if(iMaxI==1)
	{
		addmodelbyIndex1(2,iMaxI++);	
	}
});


</script>
<?php $this->load->view('admin/_footer1') ?>